import request from "@/utils/request";

// 查询加班管理列表
export function listOvertime(query) {
  return request({
    url: "/cld/overtime/list",
    method: "get",
    params: query,
  });
}

// 查询加班管理详细
export function getOvertime(query) {
  return request({
    url: "/cld/overtime/loadDetails",
    method: "get",
    params: query,
  });
}

// 新增加班管理
export function addOvertime(data) {
  return request({
    url: "/cld/overtime",
    method: "post",
    data: data,
  });
}

// 修改加班管理
export function updateOvertime(data) {
  return request({
    url: "/cld/overtime",
    method: "put",
    data: data,
  });
}

// 审核
export function auditOvertime(data) {
  return request({
    url: "/cld/overtime/audit",
    method: "put",
    data: data,
  });
}

// 删除加班管理
export function delOvertime(overtimeId) {
  return request({
    url: "/cld/overtime/" + overtimeId,
    method: "delete",
  });
}

// 查询加班管理详细
export function selectOvertimeAnalyze(query) {
  return request({
    url: "/cld/overtime/selectOvertimeAnalyze",
    method: "get",
    params: query,
  });
}
